import request from '@/utils/request'
import {Department,DeleteRequest} from "@/interface/department";

//部门列表
export const DepartmentListR = () => {
  return request({
    method: 'GET',
    url: '/department',
  })
}

//添加部门
export const DepartmentAddR = (req: Department) => {
  return request({
    method: 'POST',
    url: '/department',
    data: JSON.stringify(req),
  })
}

//修改部门
export const DepartmentUpdateR = (req: Department) => {
  return request({
    method: 'PUT',
    url: '/department',
    data: JSON.stringify(req),
  })
}


//删除部门
export const DepartmentRemoveR = (req:DeleteRequest) => {
  return request({
    method: 'DELETE',
    url: `/department`,
    params: req
  })
}

